package com.cee.sch.job.bean;

import com.cee.util.StringUtil;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class CommonScheduleJobLog {

    public static final String ERROR_CODE_OK = "0";
    public static final String ERROR_CODE_FAIL = "1";
    public static final int MAX_LENGTH = 4000;


    /**
     *
     */
    private Long visSysSchJobLogKey;

    /**
     *
     */
    private Long visSysSchJobKey;

    /**
     *
     */
    private String jobName;

    /**
     *
     */
    private Long recTotal = 0L;

    /**
     *
     */
    private Long recSuccess = 0L;

    /**
     *
     */
    private Long recFail = 0L;

    /**
     *
     */
    @JsonFormat(pattern = "dd/MM/yyyy HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /**
     *
     */
    @JsonFormat(pattern = "dd/MM/yyyy HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    /**
     *
     */
    private String status;

    /**
     *
     */
    private String errorCode;

    /**
     *
     */
    private String errorMsg;

    /**
     *
     */
    private Date lastRecDelDate;

    /**
     *
     */
    @JsonFormat(pattern = "dd/MM/yyyy HH:mm:ss", timezone = "GMT+8")
    private Date lastRecTxnDate;

    /**
     *
     */
    private String lastRecTxnTypeCode;

    /**
     *
     */
    private String lastRecTxnUserId;

    /**
     *
     * @return VIS_SYS_SCH_JOB_LOG_KEY
     */
    public Long getVisSysSchJobLogKey() {
        return visSysSchJobLogKey;
    }

    /**
     *
     * @param visSysSchJobLogKey
     */
    public void setVisSysSchJobLogKey(Long visSysSchJobLogKey) {
        this.visSysSchJobLogKey = visSysSchJobLogKey;
    }

    /**
     *
     * @return VIS_SYS_SCH_JOB_KEY
     */
    public Long getVisSysSchJobKey() {
        return visSysSchJobKey;
    }

    /**
     *
     * @param visSysSchJobKey
     */
    public void setVisSysSchJobKey(Long visSysSchJobKey) {
        this.visSysSchJobKey = visSysSchJobKey;
    }

    /**
     *
     * @return JOB_NAME
     */
    public String getJobName() {
        return jobName;
    }

    /**
     *
     * @param jobName
     */
    public void setJobName(String jobName) {
        this.jobName = jobName == null ? null : jobName.trim();
    }

    /**
     *
     * @return REC_TOTAL
     */
    public Long getRecTotal() {
        return recTotal;
    }

    /**
     *
     * @param recTotal
     */
    public void setRecTotal(Long recTotal) {
        this.recTotal = recTotal;
    }

    /**
     *
     * @return REC_SUCCESS
     */
    public Long getRecSuccess() {
        return recSuccess;
    }

    /**
     *
     * @param recSuccess
     */
    public void setRecSuccess(Long recSuccess) {
        this.recSuccess = recSuccess;
    }

    /**
     *
     * @return REC_FAIL
     */
    public Long getRecFail() {
        return recFail;
    }

    /**
     *
     * @param recFail
     */
    public void setRecFail(Long recFail) {
        this.recFail = recFail;
    }

    /**
     *
     * @return START_TIME
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     *
     * @param startTime
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     *
     * @return END_TIME
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     *
     * @param endTime
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     *
     * @return STATUS
     */
    public String getStatus() {
        return status;
    }

    /**
     *
     * @param status
     */
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    /**
     *
     * @return ERROR_CODE
     */
    public String getErrorCode() {
        return errorCode;
    }

    /**
     *
     * @param errorCode
     */
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode == null ? null : errorCode.trim();
    }

    /**
     *
     * @return ERROR_MSG
     */
    public String getErrorMsg() {
        return errorMsg;
    }

    /**
     *
     * @param errorMsg
     */
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg == null ? null : StringUtil.substring(errorMsg.trim(), MAX_LENGTH);
    }

    /**
     *
     * @return LAST_REC_DEL_DATE
     */
    public Date getLastRecDelDate() {
        return lastRecDelDate;
    }

    /**
     *
     * @param lastRecDelDate
     */
    public void setLastRecDelDate(Date lastRecDelDate) {
        this.lastRecDelDate = lastRecDelDate;
    }

    /**
     *
     * @return LAST_REC_TXN_DATE
     */
    public Date getLastRecTxnDate() {
        return lastRecTxnDate;
    }

    /**
     *
     * @param lastRecTxnDate
     */
    public void setLastRecTxnDate(Date lastRecTxnDate) {
        this.lastRecTxnDate = lastRecTxnDate;
    }

    /**
     *
     * @return LAST_REC_TXN_TYPE_CODE
     */
    public String getLastRecTxnTypeCode() {
        return lastRecTxnTypeCode;
    }

    /**
     *
     * @param lastRecTxnTypeCode
     */
    public void setLastRecTxnTypeCode(String lastRecTxnTypeCode) {
        this.lastRecTxnTypeCode = lastRecTxnTypeCode == null ? null : lastRecTxnTypeCode.trim();
    }

    /**
     *
     * @return LAST_REC_TXN_USER_ID
     */
    public String getLastRecTxnUserId() {
        return lastRecTxnUserId;
    }

    /**
     *
     * @param lastRecTxnUserId
     */
    public void setLastRecTxnUserId(String lastRecTxnUserId) {
        this.lastRecTxnUserId = lastRecTxnUserId == null ? null : lastRecTxnUserId.trim();
    }
}